
<div class="modals" *ngIf="dialogShow">
    <app-edit-dialog [editdialogShow]='editdialogshow' [editParam]='param' (editdialogClose)='resive($event)'></app-edit-dialog>
    <div class="modal-dialog">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" (click)="close()">
                    <span aria-hidden="true">×</span></button>
                <h4 class="modal-title">{{'COMMON.FILTER_GROUP'|translate}}</h4>
            </div>
            <div class="modal-body">
                <div class="row">
                    <div class="col-md-12 form-horizontal">
                        <div class="form-group">
                            <label class="col-sm-2 control-label">{{'CONFIG.WIDGET.COLUMN'|translate}}</label>
                            <div class="col-sm-10">
                                <div class="form-control"
                                        style="min-height: 35px;height: auto;padding: 0px">
                                    <span *ngFor="let o of columnObjs"
                                    class="btn btn-default btn-sm" style="margin: 3px 3px;"
                                    (click)="addColumn(o.column)">{{o.alias?o.column+'('+o.alias+')':o.column}}</span>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">{{'CONFIG.WIDGET.FILTER'|translate}}</label>
                            <div class="col-sm-10">
                                <div class="form-control"
                                        style="min-height: 38px;height: auto;padding: 0px">
                                    <div *ngFor="let o of data.filters" class="btn-group"
                                            style="margin: 3px 3px;">
                                        <button type="button" class="btn btn-default btn-sm"
                                                style="cursor: move;">
                                            {{o}}
                                        </button>
                                        <button type="button"
                                                class="btn btn-default btn-sm dropdown-toggle"
                                                (click)="editFilter(o)">
                                            <span class="fa fa-edit"></span>
                                        </button>
                                        <button type="button"
                                                class="btn btn-default btn-sm dropdown-toggle"
                                                (click)="data.filters.splice($index, 1)">
                                            <span class="fa fa-trash-o"></span>
                                        </button>
                                    </div>
                                    <div class="btn-group" style="margin: 3px 3px;" *ngIf='editevent'>
                                            <button type="button" class="btn btn-default btn-sm"
                                                    style="cursor: move;">
                                                {{editdata}}
                                            </button>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">{{'CONFIG.WIDGET.ALIAS'|translate}}</label>
                            <div class="col-sm-10">
                                <input class="form-control" [(ngModel)]="data.group">
                                {{data.group}}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default pull-left" data-dismiss="modal" (click)="close()">
                    {{'COMMON.CANCEL'|translate}}
                </button>
                <button type="button" class="btn btn-primary" (click)="ok($event)">{{'COMMON.OK'|translate}}</button>
            </div>
    </div>
</div>
